<?php
namespace Game\Factory;

use Game\Entity\Weapon;
use Game\Entity\Armor;

class CharacterFactory
{
    /**
     * Create Item
     * @return Game\Entity\Item
     * @param string $type
     */
    public function create($type)
    {
        if( $type == 'weapon' )
            return new Weapon();
        elseif( $type == 'armor' )
            return new Armor();

        throw new \InvalidArgumentException('Unknown item type');
    }
}
